
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
	TEST(should be able to calculate area: 5*6=30)
	{
		Rectangle rectangle(5,6);
		ASSERT_EQ(5*6, rectangle.getArea());
	}

        TEST(should be able to calculate primeter: (5+6)* 2= 22)
	{
		Rectangle rectangle(5,6);
		ASSERT_EQ(22, rectangle.getPrimeter());
	}

        TEST(should be able to set length: 5*6.059=5*6.05)
	{
		Rectangle rectangle(5,6);
                rectangle.setLength(6.059);
		ASSERT_EQ(5*6.05, rectangle.getArea());
	}

        TEST(should be able to set width: 5.1113*6=5.11*6)
	{
		Rectangle rectangle(5,6);
                rectangle.setWidth(5.1113);
		ASSERT_EQ(30.66, rectangle.getArea());
	}

        TEST(should be able to calculate area: 5.55*6.63=36.80)
	{
		Rectangle rectangle(5.55,6.63);
		ASSERT_EQ(36.80, rectangle.getArea());
	}

        TEST(should be able to calculate area: 5.51*6.63=36.53)
	{
		Rectangle rectangle(5.51,6.63);
		ASSERT_EQ(36.53, rectangle.getArea());
	}

        TEST(should be able to calculate area: 5*0=0)
	{
		Rectangle rectangle(5,0);
		ASSERT_EQ(0, rectangle.getArea());
	}

        TEST(should be able to calculate primeter: (5+0)* 2= 0)
	{
		Rectangle rectangle(5,0);
		ASSERT_EQ(0, rectangle.getPrimeter());
	}

        

};


